$bacolor:red;
$width:700px;
$height:500px;
body{
    background: $bacolor;
    width:$width;
    height:$height;
}
@media screen and(max-width:$height){
    body{
        background:blue;
    }
}
@media screen and(max-height:width){
    body{
        background:red;
    }
}